<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>万达营销流程管理系统</title>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="js/ie6png.js" ></script>
<script type="text/javascript">
DD_belatedPNG.fix('div,ul,li,a,p,img,body,dl,dt,dd');</script>
<![endif]-->
 <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
</script>
<script>
<!--

function setTab(name,cursel,n){
for(i=1;i<=n;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById("con_"+name+"_"+i);
menu.className=i==cursel?"hover":"";
con.style.display=i==cursel?"block":"none";
}
}

//-->
//ajax通过id
      $(function(){
      
      
      
      
      
       $('#roomId').change(function(){
        		var roomId = $('#roomId').val();
        		//alert(roomId);
        		
        		$.ajax({
        			url:"/wanda/order/getUnit.do",
        			type:"post",
        			dataType:"json",
        			data:{"roomId":roomId},
        			success:function(data){
        				//alert(data.a);
        				$('#payArea').val(data.c);
        				$('#unitPrice').val(data.a);
        				$('#total').val(data.b);
        				//document.getElementById("payArea").val(data.c);
        				//document.getElementById("unitPrice").val(data.a);
        				//document.getElementById("total").val(data.b);
        			}
        		});
        	});
      });
        	
        
       		
        		
        	
        	
</script>
</head>
<body>
<div class="yboxwidth boxcenter">
  <div class="ybox09">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="ybox10td1"><a href="#"><img src="../images/op8_1.gif" width="28" height="54" /></a></td>
        <td></td>
        <td class="ybox10td1"><a href="#"><img src="../images/op8_2.gif" width="28" height="54" /></a></td>
      </tr>
    </table>
  </div>
  <div class="ybox02">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="margb4">
      <tr>
        <td class="ybox03td1"></td>
        <td class="ybox03td2"></td>
        <td class="ybox03td3"></td>
      </tr>
      <tr>
        <td class="ybox03td4"></td>
        <td class="ybox03td5"><div class="ybox05 margb8">
           
          </div>
          <form action="/wanda/order/update.do" method="post">
          <table width="100%" border="0" cellpadding="0" cellspacing="1" class="ybox04table">
            <tr>
              <td width="15%" class="ybox04tdl"><span class="red">*</span> 订单号</td>
              <td width="18%" class="ybox04tdr"><input name="orderId" type="text"  class="black12" id="orderId" style="width:90%;" value="${model.orderId }" disabled="disabled"/></td>
              <td width="15%" class="ybox04tdl"><span class="red">*</span> 客户名称</td>
              <td width="18%" class="ybox04tdr"><input name="customerName" type="text" class="black12" style="width:90%;" value="${ model.customerName}"/></td>
              <td width="15%" class="ybox04tdl"><span class="red">*</span>房间编号</td>
              <td width="19%" class="ybox04tdr">
              
              <%-- <input name="roomId" type="text"  class="black12" id="roomId" style="width:90%;" value="${ model.roomId}" />
               --%>
               <select name="roomId" id="roomId" class="black12" style="width:90%;">
               <c:forEach items="${selectRooms }" var="rooms">
               <c:choose >
               <c:when test="${model.roomId ==rooms.roomId}">
               <option value="${ model.roomId }" selected>${ rooms.roomCode }</option>
               </c:when>
               <c:otherwise>
				<option value="${rooms.roomId }">${rooms.roomCode  }</option>
				</c:otherwise>
               </c:choose>
               </c:forEach>
               </select>
              </td>
            </tr>
            <tr>
              <td  class="ybox04tdl"><span class="red">*</span> 购买面积</td>
              <td  class="ybox04tdr"><input type="text" id="payArea" name="payArea" class="black12" style="width:90%;" value="${ model.payArea}" /></td>
              <td class="ybox04tdl"><span class="red">*</span> 房间单价</td>
              <td class="ybox04tdr"><input type="text" id="unitPrice" name="unitPrice" class="black12" style="width:90%;" value="${model.unitPrice }"/></td>
              <td class="ybox04tdl"><span class="red">*</span> 房间总价</td>
              <td class="ybox04tdr"><input type="text" id="total" name="total" class="black12" style="width:90%;" value="${model.total }"/></td>
            </tr>
            <tr>
            <td  class="ybox04tdl"><span class="red">*</span> 付款方式</td>
              <td  class="ybox04tdr">
             <%--  <input type="text" name="payTypeName" class="black12" style="width:90%;" value="${model.payTypeName }"/>
              --%> 
               <select name="payTypeName" id="payTypeName" class="black12" style="width:90%;">
               <c:forEach items="${paylist }" var="pay">
               <c:choose >
               <c:when test="${model.payTypeName ==pay.pay_type_name}">
               <option value="${ model.payTypeName }" selected>${ model.payTypeName }</option>
               </c:when>
               <c:otherwise>
				<option value="${pay.pay_type_name }">${pay.pay_type_name  }</option>
				</c:otherwise>
               </c:choose>
               </c:forEach>
               </select>
              </td>
              <td  class="ybox04tdl"><span class="red">*</span> 订单类型</td>
              <td  class="ybox04tdr"><input type="text" name="orderType" class="black12" style="width:90%;" value="${model.orderType }"/></td>
              <td class="ybox04tdl"><span class="red">*</span> 业务员名称</td>
              <td class="ybox04tdr"><input name="name" type="text"  class="black12" id="textfield" style="width:90%;" value="${model.name }" /></td>
             
            </tr>
           <tr>
           <td ><input type="hidden" name="orderId" value="${model.orderId }"/></td>
          <td></td>
           <td class="ybox04tdl">
           <input type="submit" value="确定" style="width:90%;"/>
           </td>
           </tr>
        
           
          
          </table>
          </form>
          </td>
        <td class="ybox03td6"></td>
      </tr>
      <tr>
        <td class="ybox03td7"></td>
        <td class="ybox03td8"></td>
        <td class="ybox03td9"></td>
      </tr>
    </table>
    
   <!--  <table width="380" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="60" align="center"><a href="/wanda/opening-report/home.do"><img src="../images/botton02.gif" width="95" height="34" /></a></td>
      </tr>
    </table> -->
  </div>
</div>
</body>
</html>
